From 765e808337e60f2450138e286198c94a3d0a7008 Mon Sep 17 00:00:00 2001 From: "awilliam@xenbuild2.aw" Date: Tue, 20 Mar 2007 09:16:09 -0600 Subject: [PATCH] [IA64] Fix thash_init() Lost initializating page_flag of the last member in cch. Signed-off-by: Zhang Xin --- xen/arch/ia64/vmx/vtlb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/ia64/vmx/vtlb.c b/xen/arch/ia64/vmx/vtlb.c index 7ed628ba66..3b6c5377b7 100644 --- a/xen/arch/ia64/vmx/vtlb.c +++ b/xen/arch/ia64/vmx/vtlb.c @@ -642,7 +642,7 @@ void thash_init(thash_cb_t *hcb, u64 sz) }while(num); hcb->cch_freelist = p = hcb->cch_buf; - num = (hcb->cch_sz/sizeof(thash_data_t))-1; + num = hcb->cch_sz / sizeof(thash_data_t); do{ p->page_flags = 0; p->itir = 0; @@ -650,6 +650,6 @@ void thash_init(thash_cb_t *hcb, u64 sz) p++; num--; }while(num); - p->itir = 0; - p->next = NULL; + + (p - 1)->next = NULL; } -- 2.30.2